// -----------------------------------------------------------------------------
// M A R I T I M E   R E S E A R C H   I N S T I T U T E   N E T H E R L A N D S
// -----------------------------------------------------------------------------
// Program  :
// Module   :
// File     : GtkWindow.h
// -----------------------------------------------------------------------------
// Revisions:
// February 13, 2009  asicherer
// -----------------------------------------------------------------------------

#ifndef GTKWINDOW_H
#define	GTKWINDOW_H

#include <gtk/gtk.h>

// -----------------------------------------------------------------------------
// class GtkAppWindow
// -----------------------------------------------------------------------------
/// base class of main Gtk application window
/** This class can be used as basis for small applications with one control window.
 *  The window does not have an event loop to enable coupling with OpenScenegraph.
 */
// -----------------------------------------------------------------------------
class GtkAppWindow
{

public:

    GtkAppWindow(int *argc, char ***argv, const char *xmlFile, const char *windowName);

    virtual ~GtkAppWindow();

    void show();

    void handleEvents();

protected:

    GtkBuilder *m_pBuilder; ///< pointer to gtk builder (loads widgets)
    GtkWidget  *m_pWindow;  ///< pointer to gtk window

private:

    /// @cond nevercall
    GtkAppWindow();
    GtkAppWindow(const GtkAppWindow& orig);
    GtkAppWindow & operator =(const GtkAppWindow& orig);
    // @endcond

};

void messageBox(const char *title, const char *message);
bool confirmBox(const char *title, const char *message);
bool yesnoBox(const char *title, const char *message, bool *yes);

#endif	/* GTKWINDOW_H */

